<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chome=1" />
		<!--视口--设备宽度--初始缩放比例--最小缩放比例--最大缩放比例--用户缩放-->
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<!--禁止浏览器自动的识别-电话号码-email--->
		<meta name="format-detection" content="telephone=no,email=no" />
		<!--是否启用Web全屏-->
		<meta name="apple-mobile-web-app-capable" content='yes' />
		<meta name="apple-mobile-web-status-bar-style" content="normal|black|black-translucent">
		<!--设置苹果工具栏颜色-->
		<meta name="apple-mobile-web-app-status-bar-style" content='black' />
		<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
		<link rel="stylesheet" type="text/css" href="css/ww.css" />
		<title></title>
	</head>

	<body ng-app="app">
		<div class="box-1">

			<div class="daohang-1">
				<img src="img1/zhuangtai.png">
			</div>
			<div class="xia-1">
				<div class="kuang-1">
					<input type="text">
					<a href="jiaoben5105/index.html"><span class="glyphicon glyphicon-list"></span></a>
				</div>
			</div>
			<div ng-view style="margin-top: 55px;">
				<!--<img src="../img1/l1_02.png">-->
			</div>
			<footer>
				<div>
					<a href="#/shpou">
						<img src="img1/首页.png">
						<p>首页</p>
					</a>
				</div>
				<div>
					<a href="#/midi">
						<img src="img1/迷地.png">
						<p>迷地</p>
					</a>
				</div>
				<div>
					<a href="#/weipai">
						<img src="img1/微拍.png">
						<p>微拍</p>
					</a>
				</div>
				<div>
					<a href="#/xiaoxi">
						<img src="img1/消息.png">
						<p>消息</p>
					</a>
				</div>
				<div>
					<a href="#wode">
						<img src="img1/我.png">
						<p>我</p>
					</a>
				</div>

			</footer>
<!--<img src="img1/ajax-loader.gif">-->
		</div>
		<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/angular-route1.4.5.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/iscroll.js" type="text/javascript" charset="utf-8"></script>

		<script src="js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
		<!--<script src="../bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>-->
		<!--<script src="../bootstrap/js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>-->
		<script src="js/zepto.js" type="text/javascript" charset="utf-8"></script>
		<!--	<script src="../js/touch.js" type="text/javascript" charset="utf-8"></script>-->
		<script src="js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var app = angular.module("app", ["ngRoute"]);
			app.config(function($routeProvider) {
				$routeProvider
					.when("/shpou", {
						templateUrl: "html/shouye.html",
						controller: "controller1"
					})
					.when("/midi", {
						templateUrl: "html/midi.html",
						controller: "controller2"
					})
					.when("/weipai", {
						templateUrl: "html/shou.html",
						controller: "mycontroller"
					})
					.when("/xiaoxi", {
						templateUrl: "html/xiaoxi.html",
						controller: "controller3"
					})
					.when("/wode", {
						templateUrl: "html/wo.html",
						controller: "controller4"
					})
					.otherwise({
						redirectTo: "/weipai"
					})
			})
			app.controller("mycontroller", function($scope, $http, $timeout) {
				setTimeout(function() {
					var swiper = new Swiper(".lb-1", {
						autoplay:2000
					})
				}, 2000)

				//	var is=new IScroll("#main",{
				//		scrollY:true
				//	})
				var is = new IScroll("#main", {
						bindToWrapper: true, //光标、触摸超出容器是，对否停止滚动
					})
					//阻止默认事件
				document.addEventListener("touchmove", function(ev) {
					ev.preventDefault()
				}, {
					passive: false
				})

				document.addEventListener("touchmove", function() {
					//下拉40 显示
					if(is.startY > 40) {
						$(".t").css("display", "block");

					}
				})
				document.addEventListener("touchend", function() {
					if(is.startY > 40) {
						//				$(".t").html("正在刷新")
						$(".t").css("line-height", "5rem");
						setTimeout(function() {
								$(".t").html("刷新成功")
							}, 1000)
							//定时器
						setTimeout(function() {
							$(".t").css("display", "none");

							$(".t").text("")
							$(".t").css("line-height", "5rem");
							$(".t").append("<img src='img1/ajax-loader.gif' style='vertical-align: middle;'>" + "下拉刷新")

						}, 2000)
					}
				})
				var swiper2 = new Swiper(".lb-2", {
					autoplay: 2000,
					direction: "vertical"
				})
				$http.get("js/json.json").success(function(data) {
					$scope.arr = data;
					console.log($scope.arr)

				})
				var nav = new Swiper("nav", {
					slidesPerView: 2,
					onTap: function() {
						var index = nav.clickedIndex;
						tab.slideTo(index);
						$("nav li").eq(index).addClass("active").siblings().removeClass("active")
					}
				})
				var tab = new Swiper(".tab", {

				})

			})
			app.controller("controller1", function($scope, $http, $timeout) {
				var swiper = new Swiper(".lb", {
					autoplay: 2000
				})
				var nav = new Swiper("nav", {
					slidesPerView: 2,
					onTap: function() {
						var index = nav.clickedIndex;
						tab.slideTo(index);
						$("nav li").eq(index).addClass("active").siblings().removeClass("active")
					}
				})
				var tab = new Swiper(".tab", {

				})
				setTimeout(function() {
					var is = new IScroll("main")
				}, 200)

			})
			app.controller("controller2", function($scope, $http, $timeout) {
				setTimeout(function() {
					var iss = new IScroll("main")
				}, 200)

				var nav = new Swiper("nav", {
					slidesPerView: 2,
					onTap: function() {
						var index = nav.clickedIndex;
						tab.slideTo(index);
						$("nav li").eq(index).addClass("active").siblings().removeClass("active")
					}
				})
				var tab = new Swiper(".tab", {

				})

				$http.get("js/json.json").success(function(data) {
					$scope.arr = data;
					console.log($scope.arr)

				})
			})
			app.controller("controller3", function($scope, $http, $timeout) {
				setTimeout(function() {
					var is = new IScroll("main")
				}, 200)
			})
			app.controller("controller4", function($scope, $http) {
				setTimeout(function() {
					var is = new IScroll("main")
				}, 200)

				$http.get("js/json.json").then(function(data) {
					$scope.arr = data.data.tuwen;
					console.log($scope.arr)

				})

			})
		</script>
	</body>

</html>